
package com.hq.common.eventbus;

import java.io.Serializable;

/**
 * 事件基类,把监听器处理事件时可能需要的内容放到里面
 * 
 * @author zlh
 * @version Revision: 1.00 Date: Sep 6, 2011
 */
public class ActionEvent<T> implements Serializable{

    private static final long serialVersionUID = 4084808144858544346L;
    protected  Object  source;

    /**
     * 
     * @param source 产生事件的对象(事件相关的对象)
     */
    public ActionEvent(T source) {
        this.source = source;
    }


    /**
     * The object on which the Event initially occurred.
     *
     * @return   The object on which the Event initially occurred.
     */
    @SuppressWarnings("unchecked")
    public T getSource() {
        return (T)source;
    }
}
